package com.crud.generator.dto;

import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * SQL解析请求DTO
 * 
 * @author CRUD-Generator
 */
@Data
@Schema(description = "SQL解析请求")
public class SqlParseRequest {
    
    @NotBlank(message = "DDL语句不能为空")
    @Size(max = 10000, message = "DDL语句长度不能超过10000字符")
    @Schema(description = "CREATE TABLE DDL语句", example = "CREATE TABLE user (id BIGINT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) NOT NULL);")
    private String ddl;
    
    @Schema(description = "包名前缀", example = "com.example")
    private String packagePrefix;
    
    @Schema(description = "作者信息", example = "张三")
    private String author;

    @Schema(description = "是否启用Redis缓存", example = "false")
    private Boolean enableRedis = Boolean.FALSE;

    @Schema(description = "是否启用基础鉴权", example = "true")
    private Boolean enableSecurity = Boolean.FALSE;
}
